<style type="text/css">
    .padLefRig0 {
        padding-left: 0px;
        padding-right: 0px
    }
    .modal-lg {
    width: 70%;
}

    .thWidthAndHeight{width:100px; height:20px;}
    /*.marLef030{
        margin-left: -30px;
    }*/
</style>
<div class="container-fluid form-horizontal ">
    <form name="addPriceCalendar" class="form-horizontal form-validation">
        <div class="modal-header">
            <h4 class="modal-title">设置时间价格</h4>
        </div>
        <div class="modal-body" >
        
        
            <div class="container-fluid">             
                <div class="col-xs-12 row">
                    <div class="col-xs-2" ng-show="!addUpdateFlag">
                        <span >
                        出团日期 :
                        </span>
                    </div>
                    <div class="col-xs-4" ng-show="!addUpdateFlag">
                        <div>
                            {{oneDate}}
                        </div>
                    </div>
                    <div class="col-xs-2" ng-show="!addUpdateFlag">
                        <span >
                        回团日期 :
                        </span>
                    </div>
                    <div class="col-xs-4" ng-show="!addUpdateFlag">
                        <div>
                            {{returnday}}
                        </div>
                    </div>
                    <!-- 添加开班日期 -->
                    <div class="col-xs-2" ng-show="addUpdateFlag">
                        添加开团日期 :
                    </div>
                    <div class="col-xs-10 row" ng-show="addUpdateFlag">
                        
                        <div class="col-xs-12 row">
                            <div class="col-xs-6">
                                <div class="col-xs-12">
                                    <div class="input-group">
                                        <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="date.opened" close-text="Close"
                                            readonly />
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-default"
                                                    ng-click="dateOpen($event, date)">
                                                <i class="glyphicon glyphicon-calendar"></i>
                                            </button>
                                            <a class="btn btn-success " ng-click="addSelectDate()">添加</a>
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-6 row">
                                <div class="col-xs-12">
                                    <div class="col-xs-5" ng-repeat="date in result.selectedDate" ng-dblclick="removeSelectDate($index)">
                                        <a class="btn btn-info btn-sm">
                                            {{date.date}} &nbsp;&nbsp;<i class="glyphicon glyphicon-remove" ng-click="removeSelectDate($index)"></i>
                                        </a>
                                        <br/>
                                        <br/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                    </div>
                    <br/>
                    <br/>
                    <!-- 设置价格 -->
                    <div class="col-xs-2 small checkbox">
                        <span>
                            设置价格 :
                        </span>
                    </div>
                    <div class="col-xs-10 row">
                        <div class="col-xs-2 small">
                            成人价
                        </div>
                        <div class="col-xs-10 row">
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    结算价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.adult_call_price" ng-disabled="product_state_name_flag || result.adult_ban " ng-required="!(product_state_name_flag || result.adult_ban)"
                                    />
                                </div>
                            </div>
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    销售价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.adult_sale_price" ng-disabled="product_state_name_flag || result.adult_ban " ng-required="!(product_state_name_flag || result.adult_ban)"
                                    />
                                </div>
                            </div>                           
                        </div>

                        <div class="col-xs-2 small">
                            儿童价
                        </div>
                        <div class="col-xs-10 row">
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    结算价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.children_call_price" ng-disabled="product_state_name_flag || result.children_ban " ng-required="!(product_state_name_flag || result.children_ban)"
                                    />
                                </div>
                            </div>
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    销售价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.children_sale_price" ng-disabled="product_state_name_flag || result.children_ban " ng-required="!(product_state_name_flag || result.children_ban)"
                                    />
                                </div>
                            </div>
                            <div class="col-xs-3 checkbox">
                                <label>
                                    <input type="checkbox" ng-model="result.children_ban"  ng-disabled="product_state_name_flag "/>
                                    禁售
                                </label>
                            </div>
                        </div>

                        <div class="col-xs-2 small">
                            单房差
                        </div>
                        <div class="col-xs-10 row">
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    结算价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.single_room_call_price" ng-disabled="product_state_name_flag || result.single_room_ban " ng-required="!(product_state_name_flag || result.single_room_ban)"
                                    />
                                </div>
                            </div>
                            <div class="col-xs-5 row">
                                <div class="col-xs-4 small padLefRig0">
                                    销售价
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.single_room_sale_price" ng-disabled="product_state_name_flag || result.single_room_ban " ng-required="!(product_state_name_flag || result.single_room_ban)"
                                    />
                                </div>
                            </div>
                            <div class="col-xs-3 checkbox">
                                <label>
                                    <input type="checkbox" ng-model="result.single_room_ban"  ng-disabled="product_state_name_flag"/>
                                    禁售
                                </label>
                            </div>
                        </div>

                    </div>
                    <!-- 设置价格 -->

                    <!-- 设置库存 -->
                    <div class="col-xs-2 small checkbox">
                        <br/>
                        <span>
                            <!--<input type="checkbox" />-->
                            设置库存 :
                        </span>
                    </div>
                    <div class="col-xs-10 row">
                        <br/>
                        <div class="col-xs-3 small">
                            <label>
                                <input type="radio" name="kuCun" ng-model="result.stock_type" value="1"  ng-disabled="product_state_name_flag " required="required"/>
                                共有库存
                            </label>
                        </div>
                        <div class="col-xs-9 ">
                            <div class="col-xs-12 ">
                                <div class="col-xs-4 small padLefRig0">
                                    日库存量
                                </div>
                                <div class="col-xs-8">
                                    <input type="number" class="form-control input-sm" ng-model="result.stock_totals" ng-disabled="result.stock_type != 1 " ng-required="!(result.stock_type != 1)" />
                                    <input type="number" ng-show="false" class="form-control input-sm" ng-model="result.stock" />
                                </div>
                            </div>
                        </div>

                        <div class="col-xs-12 small">
                            <label>
                                <input type="radio" name="kuCun" ng-model="result.stock_type" value="0"  ng-disabled="product_state_name_flag "/>
                                未知库存
                            </label>
                        </div>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                    </div>         
                    </div>
                    <!-- 是否封团 -->
                    <!-- 设置提前预定时间限制 -->                  
                    <div class="col-xs-12 row">
                        <span class="col-xs-2 padLefRig0">提前预定时间：</span>
                        <span class="col-xs-2 padLefRig0" style="padding-left: 15px">
                            <select class="input-sm form-control" ng-model="result.materials_advance_reserve_day" ng-disabled="product_state_name_flag " required="required">
                                <option value="{{item.value}}" ng-repeat="item in day">{{item.value}}</option>
                            </select>
                        </span>
                        <span class="col-xs-1 padLefRig0">天</span>
                        <span class="col-xs-2 padLefRig0">
                            <select class="input-sm form-control" ng-model="result.materials_advance_reserve_hour" ng-disabled="product_state_name_flag " required="required">
                                <option value="{{item.value}}" ng-repeat="item in hour">{{item.value}}</option>
                            </select>
                        </span>
                        <span class="col-xs-1 padLefRig0">点</span>
                        <span class="col-xs-2 padLefRig0">
                            <select class="input-sm form-control" ng-model="result.materials_advance_reserve_minute" ng-disabled="product_state_name_flag " required="required">
                                <option value="{{item.value}}" ng-repeat="item in minute">{{item.value}}</option>
                            </select>
                        </span>
                        <span class="col-xs-1 padLefRig0">分 </span>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <!-- 退改规则 -->                  
                    <div class="col-xs-12 row" style="margin-top: 10px">
                        <span class="col-xs-2">退改类型：</span>
                        <span class="col-xs-3">
                            <select class="input-sm form-control select" ng-model="result.back_rule_type" ng-disabled="product_state_name_flag " required="required">
                                <option value="0">不退不改</option>
                                <option value="1">人工退改</option>
                            </select>
                        </span>
                    </div>
                  </div>
                
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="ok()">OK</button>
            <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
        </div>
    </form>
</div>